@charset "utf-8";

$color-background: white;
$color-text: #444;
$color-text-dark: #333;
$color-key: black;
$color-value: #0B7500;
$color-url-hover: #050;
$color-null: #1A01CC;

body {
  -webkit-user-select: text;
  overflow-x: hidden;
  overflow-y: scroll !important;
  margin: 0;
  position: relative;
  background-color: $color-background;

  pre#emptyPre {
    word-wrap: break-word;
    white-space: pre-wrap;
  }
}

pre {
  white-space: normal;
  font-size: 13px;
  color: $color-text;
}

#optionBar {
  -webkit-user-select: none;
  display: block;
  position: absolute;
  top: 9px;
  right: 17px;
  z-index: 10;

  button {
    -webkit-border-radius: 2px;
    -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    -webkit-user-select: none;
    background: -webkit-linear-gradient(#fafafa, #f4f4f4 40%, #e5e5e5);
    border: 1px solid #aaa;
    color: $color-text;
    font-size: 12px;
    margin-bottom: 0;
    min-width: 4em;
    padding: 3px 0;
    position: relative;
    display: inline-block;
    width: 80px;
    text-shadow: 1px 1px rgba(255, 255, 255, 0.3);

    &:hover {
      -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
      background: #ebebeb -webkit-linear-gradient(#fefefe, #f8f8f8 40%, #e9e9e9);
      border-color: #999;
      color: #222;
    }

    &:focus {
      outline: 0;
    }
  }

  #buttonFormatted:active,
  #buttonPlain:active {
    -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
    background: #ebebeb -webkit-linear-gradient(#f4f4f4, #efefef 40%, #dcdcdc);
    color: $color-text-dark;
  }

  #buttonFormatted.selected,
  #buttonPlain.selected {
    -webkit-box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.2);
    background: #ebebeb -webkit-linear-gradient(#e4e4e4, #dfdfdf 40%, #dcdcdc);
    color: $color-text-dark;
  }

  #collapseAll {
    margin-right: 10px;
  }

  #buttonFormatted {
    margin-left: 0;
    margin-right: 10px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  #buttonPlain {
    margin-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: none;
  }

  #rawFormatterContainer {
    display: none;
    margin-top: 15px;
  }

  #optionChooser {
    display: inline-block;
    width: 21px;
    height: 21px;
    cursor: pointer;
    background-image: url('');
    background-size: cover;
    position: relative;
    top: 7px;
  }
}

#optionScreen {
  padding: 0 10px;

  #themeChooserContainer {
    #themeChooserSelectContainer {
      margin-top: 10px;
    }

    #themeChooserPreview {
      pre {
        word-wrap: break-word;
        white-space: pre-wrap;
        border: 1px solid;
        padding: 5px;
        box-shadow: inset 1px 1px 2px 0 #888888;
      }
    }
  }
}

#jsonpOpener,
#jsonpCloser {
  margin-left: -1rem;
}

#gutter {
  position: absolute;
  user-select: none;
  left: 0;
  height: 100%;
  -webkit-transition: -webkit-transform 0.1s linear;
}

[line-number]:before {
  webkit-transition: -webkit-transform 0.1s linear;
}

#formattedJson {
  position: relative;
  padding-left: 1.45rem;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
  word-wrap: break-word;
}

.dObj {
  display: block;
  padding-left: 20px;
  margin-left: -20px;
}

:not(.collapsed) > [line-number] {
  &:before {
    content: attr(line-number);
    position: absolute;
    right: calc(100% + 0.6rem);
    margin-top: 0.1rem;
    font-weight: normal;
  }
}

.collapsed {
  white-space: nowrap;
  & > .blockInner {
    display: none;
  }
  & > .ellipsis:after {
    content: "…";
    font-weight: bold;
  }
  & > .ellipsis {
    margin: 0 4px;
    color: #888;
  }
  .dObj {
    display: inline;
  }
}

.expander {
  float: left;
  margin-left: -1rem;
  margin-right: 0;
  z-index: 5;
  opacity: 0.15;
  cursor: pointer;
  font-size: 20px;
  -webkit-transition: -webkit-transform 0.1s linear;

  &:before {
    display: inline;
    content: "▾";
    user-select: none;
  }

  .collapsed > &:before {
    content: "▸";
  }

  &:hover {
    opacity: 0.35;
  }
  &:active {
    opacity: 0.5;
  }

  /* .e that are *inside* the children of a collapsed one */
  .collapsed .dObj & {
    display: none;
  }
}

.blockInner {
  display: block;
  padding-left: 24px;
  border-left: 1px dotted #bbb;
  margin-left: 2px;
}

/* SYNTAX HIGHLIGHTING */

#formattedJson, #jsonpOpener, #jsonpCloser {
  color: $color-text-dark;
  font: 13px/18px monospace;
}

#formattedJson {
  color: $color-text;
}

.b /* Bracket/brace */
{
  font-weight: bold;
}

.s {
  color: $color-value;
  word-wrap: break-word;
}

a:link, a:visited {
  text-decoration: none;
  color: inherit;
}

a:hover, a:active {
  text-decoration: underline;
  color: $color-url-hover;
}

.bl, .nl, .n { /* bool, null, number */
  font-weight: bold;
  color: $color-null;
}

.key { /* key */
  color: $color-key;
}

.nested:after {
  content: "view nested JSON";
  background-color: $color-null;
  color: $color-background;
  border-radius: 4px;
  padding: 2px 5px;
  margin-left: 10px;
  cursor: pointer;
}

#formattingMsg {
  font: 13px "Lucida Grande", "Segoe UI", "Tahoma";
  padding: 10px 0 0 8px;
  margin: 0;
  color: $color-text-dark;

  .loader {
    position: relative;
    top: 5px;
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 12px;
    height: 12px;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    display: inline-block
  }
}

#status {
  position: fixed;
  left: 0;
  bottom: 0;
  min-width: 628px;
  border: 1px solid $color-text-dark;
  border-bottom-width: 0;
  border-left-width: 0;
  border-top-right-radius: 4px;
  height: 16px;
  padding: 2px 7px 4px 4px;
  font-size: 15px;
  opacity: 0;
  background-color: $color-text;
  color: $color-background;
  transition: opacity .2s ease-out;
  -webkit-transition: opacity .2s ease-out;
  user-select: none;
  -webkit-user-select: none;

  &:not(:empty) {
    opacity: 1;
  }
}

/* Misc */
[hidden] {
  display: none !important;
}

span {
  white-space: pre-wrap;
}

/* Spinner */
@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@import "theme-default";
@import "theme-monokai";
@import "theme-xcode";
@import "theme-solarized";
@import "theme-darkorange";
@import "theme-halewa";